import pkg_resources
from base import *


class Populate(Base):

    def load_tm_od_study(self, file=None):
        dir = pkg_resources.resource_filename('test', '')
        dir = 'test'
        TriMetODStudy.load(self.db, dir, file);

    '''
        add the url to the db
    '''
    def new_plan(self, l):
        # get plan

        # new Trip db object
        tp = Trip()

        # process the TripPlan legs
        for i in qs:
            tleg = TransitLeg()
            TripPlan.transit_legs.append(tleg)

        # save trip and leg(s) records to db
        session.add(Trip)
        session.commit()
        session.flush()
